package org.sharing.design.factory;

import org.sharing.design.factory.impl.CardAwardServiceImpl;
import org.sharing.design.factory.impl.CouponAwardServiceImpl;
import org.sharing.design.factory.impl.GoodsAwardServiceImpl;

/**
 * @author: Dragon
 * @since: 2024/4/6 12:53
 */
public class AwardFactory {

    public AwardService getAwardService(Integer awardType) {
        if(awardType == null) return null;
        if(1 == awardType) return new CouponAwardServiceImpl();
        if(2 == awardType) return new GoodsAwardServiceImpl();
        if(3 == awardType) return new CardAwardServiceImpl();

        return null;
    }

}
